package com.erp.enums;

/**
 * @author zjk
 * @version 1.0
 * @description 费用类型“1”：直接费用。“2”间接费用
 * @date 2020/11/23/023 22:09
 */
public enum CostTypeEnum {
    DIRECT_COST(1,"直接费用"),
    INDIRECT_COST(2,"间接费用");
    /**
     * id
     */
    private int id;

    /**
     * 描述
     */
    private String desc;
    public int getId() {
        return id;
    }

    public String getDesc() {
        return desc;
    }

    CostTypeEnum(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }
    public static String getDescById(int id){
        for(CostTypeEnum costTypeEnum : CostTypeEnum.values()){
            if(costTypeEnum.getId() == id){
                return costTypeEnum.getDesc();
            }
        }
        return "";
    }
}
